package com.lam.dormitory.service;

import com.lam.dormitory.entity.Dormitory;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lam.dormitory.util.ResponseTemplate;
import com.lam.dormitory.vo.DormitoryVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lam
 * @since 2019-12-26
 */
public interface IDormitoryService extends IService<Dormitory> {
    /**
     * 根据dorId,buildingNo,dorNo查询宿舍信息（所包含的学生和管理员）
     * @param dormitory
     * @return
     */
    List<DormitoryVo> selectDorByDormitory(Dormitory dormitory);

    /**
     * 搜索无重复的buildingNo
     * @return
     */
    List<Dormitory> selectBuildingNo();

    /**
     * 根据dorId保存分配权限
     * @param dorId
     * @param userIds
     * @return list
     */
    ResponseTemplate addAssignStudents(Long dorId, List<Long> userIds);
}
